import { ElNotification, ElMessageBox, ElMessage } from 'element-plus'
import nprogress from 'nprogress'

// 登录提示
export function totast(
  message,
  type = 'success',
  dangerouslyUseHTMLString = false
) {
  ElNotification({
    message,
    type,
    dangerouslyUseHTMLString,
    duration: 3000,
  })
}

// 确认框
export function showModal(content = '提示内容', type = 'warning', title = '') {
  return ElMessageBox.confirm(content, title, {
    confirmButtonText: '确认',
    cancelButtonText: '取消',
    type,
  })
}

// 进度条
// 显示
export function showFullLoading() {
  nprogress.start()
}
// 隐藏
export function hideFullLoading() {
  nprogress.done()
}
